#!/usr/bin/env python
# Copyright(c) 2010 Nuttachat Wisittipanit. All rights reserved.

import os,sys

from PyQt4.QtCore import (QSettings,)


if 'mahbo_rc' not in sys.modules:
    from mahbo.lib.widgets import mahbo_rc
    sys.modules['mahbo_rc'] = mahbo_rc
    del(mahbo_rc)
 

class DB(object):
    """ Contains Database attributes for easy and consistent reference.

    """
    class database(object):
        host                = 'localhost'
        user                = 'root'
        pwd                 = 'dudesweet'
        None_               = 'N_'
        

class Settings(QSettings):
    """ Convenient replacement for QSettings.

    """
    class keys:
        """ Attributes are setting keys.

        """
        app_organization    = 'Microbiome Analysis Center'
        app_domain          = 'Bioinformatics'
        app_name            = 'MAHBO'
        app_version         = '[Build 1001]'


class PHD(object):
    
    class Folder(object):
        dissertation        = 'C:\\Users\\aonlazio\\Desktop\\PHD\\dissertation'
        paper_1             = 'C:\\Users\\aonlazio\\Desktop\\PHD\\dissertation\\documents\\PAPER_1'
        paper_2             = 'C:\\Users\\aonlazio\\Desktop\\PHD\\dissertation\\documents\\PAPER_2'
        paper_3             = 'C:\\Users\\aonlazio\\Desktop\\PHD\\dissertation\\documents\\PAPER_3'
        paper_4             = 'C:\\Users\\aonlazio\\Desktop\\PHD\\dissertation\\documents\\PAPER_4'
    

class GUTIBD(object):
    
    class Folder(object):
        
        class Gutlhpcr(object):
            ibsraw          = os.path.join(PHD.Folder.paper_1,'gutibs\\rawdata')
            ibsout          = os.path.join(PHD.Folder.paper_1,'gutibs\\output')
        
        class Gutmtps(object):
            lhpcrraw        = os.path.join(PHD.Folder.paper_2,'tripleclassification\\gutlhpcr\\rawdata')            
            lhpcrout        = os.path.join(PHD.Folder.paper_2,'tripleclassification\\gutlhpcr\\output')
            mtpsraw         = os.path.join(PHD.Folder.paper_2,'tripleclassification\\gutmtps\\rawdata\\modified')
            mtpsout         = os.path.join(PHD.Folder.paper_2,'tripleclassification\\gutmtps\\output')
            seqraw_orgn     = os.path.join(PHD.Folder.paper_2,'tripleclassification\\gutseq\\rawdata\\original')
            seqraw_uclust   = os.path.join(PHD.Folder.paper_2,'tripleclassification\\gutseq\\rawdata\\cluster\\uclust')
            seqout_uclust   = os.path.join(PHD.Folder.paper_2,'tripleclassification\\gutseq\\output\\cluster\\uclust')
            seqraw_cdhit    = os.path.join(PHD.Folder.paper_2,'tripleclassification\\gutseq\\rawdata\\cluster\\cdhit')
            seqout_cdhit    = os.path.join(PHD.Folder.paper_2,'tripleclassification\\gutseq\\output\\cluster\\cdhit')
            seqraw_nmer     = os.path.join(PHD.Folder.paper_2,'tripleclassification\\gutseq\\rawdata\\nmer')
            seqout_nmer     = os.path.join(PHD.Folder.paper_2,'tripleclassification\\gutlseq\\output\\nmer')
            seqraw_uclustT  = os.path.join(PHD.Folder.paper_2,'tripleclassification\\gutseq\\rawdata_test\\cluster\\uclust')
            seqout_uclustT  = os.path.join(PHD.Folder.paper_2,'tripleclassification\\gutseq\\rawdata_test\\cluster\\uclust')
        
    class rdpType(object):
        Eight               = '8'
        Ten                 = '10'
        LIST                = (Eight,Ten,)
    
    class rdpList(object):
        rdplevel1           = 'RDP LEVEL 1'
        rdplevel2           = 'RDP LEVEL 2'
        rdplevel3           = 'RDP LEVEL 3'
        rdplevel4           = 'RDP LEVEL 4'
        rdplevel5           = 'RDP LEVEL 5'
        rdplevel6           = 'RDP LEVEL 6'
        rdplevel7           = 'RDP LEVEL 7'
        LIST                = (rdplevel1,rdplevel2,rdplevel3,rdplevel4,
                               rdplevel5,rdplevel6,rdplevel7,)
        LIST10              = (rdplevel1,rdplevel2,rdplevel3,rdplevel4,
                               rdplevel5,rdplevel6,)
        
    class site(object):
        ileum               = 'ileum'
        colon               = 'colon'
        sigmoid             = 'sigmoid'
        lumen               = 'lumen'
        entire              = 'entire'
        LIST                = (ileum,colon,sigmoid,lumen,entire,)
        
    class Abr(object):
        main                = {'Entire'             : 'ET'  ,
                               'Ileum'              : 'IL'  ,
                               'Colon'              : 'CO'  ,
                               'Sigmoid'            : 'SM'  ,
                               'Lumen'              : 'LM'  ,                               
                               'Crohn'              : 'C'   ,
                               'Ulcerative Colitis' : 'UC'  ,
                               'Healthy Control'    : 'HC'  ,
                               }
        
    class disease(object):
        Crohn               = 'Crohn'
        Ulcer               = 'Ulcerative Colitis'
        Healthy             = 'Healthy Control'
        LIST                = (Crohn,Ulcer,Healthy,)
    


class FLOW(object):
    
    def __init__(self,**kwargs):
        self.REdatafact     = False
        self.REsvm          = False
        self.REmstat        = False
        self.__dict__.update(kwargs)  


class SeqInfo(object):
    
    def __init__(self,**kwargs):
        self.SampleName  = ''
        self.Disease     = ''
        self.Class1      = ''
        self.ClassX      = ''        
        self.__dict__.update(kwargs)
        

class FastaSeqInfo(object):
    
    def __init__(self,**kwargs):
        self.sname      = ''
        self.seq        = ''
        self.subname    = ''      
        self.__dict__.update(kwargs)
       
